{__NOLAYOUT__}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>跳转提示</title>
    <script src="__STATIC__/admin/js/jquery-1.8.3.min.js"></script>
    <script src="__STATIC__/admin/layer/layer.js"></script>
</head>
<body>
<input type="hidden" id="msg" name="msg" value="
 <?php switch ($code) {?>
    <?php case 1:?>
        <?php echo(strip_tags($msg));?>
    <?php break;?>
    <?php case 0:?> 
        <?php echo(strip_tags($msg));?> 
           <?php break;?>
        <?php } ?>  
            " />
<input type="hidden" id="url" name="url" value="<?php echo($url);?>" />
<input type="hidden" id="wait" name="wait" value="<?php echo($wait);?>" />

    <script type="text/javascript">
        (function(){
            var msg=$("#msg").val();
            var url=$("#url").val();
            var wait=$("#wait").val();
             layer.confirm(msg, {
              btn: ['确定'] //可以无限个按钮
              ,btn3: function(index, layero){
                //按钮【按钮三】的回调
              }
            }, function(index, layero){
                location.href = url;
              //按钮【按钮一】的回调
            }, function(index){
              //按钮【按钮二】的回调
            });
            // var wait = document.getElementById('wait'),
            //     href = document.getElementById('href').href;
            var interval = setInterval(function(){
                var time = --wait.innerHTML;
                if(time <= 0) {
                    location.href = url;
                    clearInterval(interval);
                };
            }, 1000);
        })();
    </script>
</body>
</html>

